import { Component, ViewChild } from '@angular/core';
import { Demo01Component } from '../demo01/demo01.component';


@Component({
  selector: 'app-demo02',
  templateUrl: './demo02.component.html',
  styleUrls: ['./demo02.component.less']
})
export class Demo02Component {
  btnText = '确定(参数)父组件'

  test = false;

  getData(even: any) {
    console.log(even, 333);
    this.test = even;
  }

  resetKHand = [
    {
      text: '复位',
      type: 0,
      imgUrl: 'assets/image/bottom-btn/03.png'
    },
  ]

  handleResetMousedown() {
    console.log(111);

  }

  handleResetMouseup() {
    console.log(222);

  }

  /**
   * 父组件调用子组件方法
   */
  @ViewChild('appDemo01') appDemo01: Demo01Component | undefined;
  getHandlerChild() {
    this.appDemo01?.handlerChild();
  }
}
